package com.java2007.hotel.factory;

/**
 * Bean工厂
 * @author ghy
 * @version 1.0
 * @date 2021-01-22
 */
public class BeanFactory {

   private static Object instance = null;

    public static Object getBean(String className){
        try {
            Class<?> clazz = Class.forName(className);
            return clazz.newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }


}
